{% extends 'template.html' %}

{% block username %}
    {{ head.username }}
{% endblock %}

{% block content %}
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">{{ head.value }}</h1>
                <h1 class="page-header" id="workflow_id" style="display: none;">{{ head.workflow }}</h1>
                <h1 class="page-header" id="first_name" style="display: none;">{{ first_name }}</h1>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-lg-6">
                                <div class="container">
                                    <form role="form" class="form-horizontal">
                                        <div class="form-group">
                                            <label class="col-sm-12" for="TextArea">申请人</label>
                                            <div class="col-sm-6">
                                                <select id="applicant" style="width: 100%">
                                                    <option value="0" selected="selected">选择申请人</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-12" for="TextArea">标题</label>
                                            <div class="col-sm-6">
                                                <input class="form-control" id="title">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label">故障分类</label>
                                            <!--资产电脑安装回收事项 已经不需要 -->
                                            {% for text, id in data.items %}
                                                <div class="form-check">
                                                    &nbsp;&nbsp;&nbsp;&nbsp;<label class="form-check-label">
                                                    <input class="form-check-input" type="radio"
                                                           id="fail_class" name="fail_class"
                                                           value="{{ id }}"/>&nbsp;&nbsp;{{ text }}
                                                </label>
                                                </div>
                                            {% endfor %}
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-12" for="TextArea">问题描述</label>
                                            <div class="col-sm-6">
                                                <textarea class="form-control" id="content" rows="5"></textarea>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-12" for="TextArea">指定一个网络管理员来处理你的故障, 如果不选，则系统指派</label>
                                            <div class="col-sm-6">
                                                <select id="assigned_to" style="width: 100%">
                                                    <option value="0" selected="selected">选择网络管理员,默认系统指派</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-12">流程步骤</label>
                                            <div class="col-sm-6">
                                                <p>{{ state_step.value }}</p>
                                            </div>
                                        </div>
                                        <div class="form-group" id='append_before'>
                                            <div class="col-sm-6">
                                                <button type="button" class="btn btn-primary" id='bt-commit'>提交</button>
                                            </div>
                                        </div>
                                    </form>
                                    <hr>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block bodyjs %}
    <script src="/static/js/failure_declare_workflow.js?v=4ec03eb858e02897d06a73423ba07122c57e03ac"></script>
{% endblock %}
{% block css %}
{% endblock %}
